<!DOCTYPE html>
<html lang="en">
  <head>
    {% block head %}
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
    <meta name="description" content="">
    <meta name="author" content="">
    <link rel="icon" href="/static/img/favicon.ico">

    <title>{% block title %}{% endblock %} - SQL分析</title>

    <!-- Bootstrap core CSS -->
    <link href="/static/css/bootstrap.min.css" rel="stylesheet">

    <link href="/static/css/bootstrapValidator.min.css" rel="stylesheet">

    <!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
    <link href="/static/css/ie10-viewport-bug-workaround.css" rel="stylesheet">

    <!-- Custom styles for this template -->
    <link href="/static/css/jumbotron-narrow.css" rel="stylesheet">

    <!-- Just for debugging purposes. Don't actually copy these 2 lines! -->
    <!--[if lt IE 9]><script src="../../assets/js/ie8-responsive-file-warning.js"></script><![endif]-->
    <script src="/static/js/ie-emulation-modes-warning.js"></script>

    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
    <!--[if lt IE 9]>
      <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
      <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
    <![endif]-->
    {% endblock %}
  </head>

  <body>

    <div class="container">
      <div class="header clearfix">
        <nav>
          <ul class="nav nav-pills pull-right">

            <li role="presentation" {% if nav == 'home' %} class="active" {% endif %}><a href="/">首页</a></li>
            <li role="presentation" {% if nav == 'analysis' %} class="active" {% endif %}><a href="/analysis">SQL分析</a></li>
            <li role="presentation" {% if nav == 'analysis_his' %} class="active" {% endif %}><a href="/analysis/his/1">分析历史</a></li>
            <li role="presentation" {% if nav == 'settings' %} class="active" {% endif %}><a href="/settings">数据库配置</a></li>
          </ul>
        </nav>
        <h3 class="text-muted">美团SQLAdvisor</h3>
      </div>

      <div class="jumbotron">
        <h2>SQLAdvisor简介</h2>
        <p class="lead">SQLAdvisor是由美团点评公司技术工程部DBA团队（北京）开发维护的一个分析SQL给出索引优化建议的工具。它基于MySQL原生态词法解析，结合分析SQL中的where条件、聚合条件、多表Join关系 给出索引优化建议。目前SQLAdvisor在美团点评内部广泛应用，公司内部对SQLAdvisor的开发全面转到github上，开源和内部使用保持一致。</p>
        {% if current_user.is_authenticated %}
          <p><a class="btn btn-lg btn-success" href="/logout" role="button">退 出</a></p>
        {% else %}
          <p><a class="btn btn-lg btn-success" href="/logout" role="button">登 录</a></p>
        {% endif %}
      </div>

      <div class="row marketing">
        {% block content %}{% endblock %}
      </div>

      <footer class="footer">
        {% block footer %}
        <p>&copy; 2016 Company, Inc.</p>
        {% endblock %}
      </footer>

    </div> <!-- /container -->


    <!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
    <script src="/static/js/ie10-viewport-bug-workaround.js"></script>
    <script src="/static/js/jquery.min.js"></script>
    <script src="/static/js/bootstrap.min.js"></script>
    <script src="/static/js/bootstrapValidator.min.js"></script>
    {% block javascript %}
    {% endblock %}
  </body>
</html>